package com.vois.jack.btmgr.classicbase;

public enum BtDevCommonMsg {
    BT_DEV_COMMON_KEY_PRESSED(0x10),
    BT_DEV_COMMON_KEY_RELEASED(0x11),
    BT_DEV_COMMON_KEY_CLICKED(0x12),
    BT_DEV_COMMON_READY_IND(0x13),
    BT_DEV_COMMON_VOLUMN_CHANGED(0x14),
    BT_DEV_HEADSET_AUDIO_STATE_CHANGED(0x15),
    BT_DEV_GET_VALIDATE_DATA_RET(0x16),
    BT_DEV_RECORDER_STARTED_RET(0x17),
    BT_DEV_RECORDER_STOPPED_RET(0x18),
    BT_DEV_GET_VENDOR_RET(0x19),
    BT_DEV_GET_VERSION_RET(0x1A),
    BT_DEV_SET_SEQID_RET(0x1B),
    BT_DEV_APP_INIT_ACK(0x1C),
    BT_DEV_GET_ADDRESS_RET(0x1D),
    BT_DEV_GET_MEDIA_FEATURE_RET(0x1E),
    BT_DEV_COMMON_NONE(-1);

    private int value;

    public int getValue() {
        return value;
    }

    BtDevCommonMsg(int value) {
        this.value = value;
    }

    public static BtDevCommonMsg valueOf(int value) {
        BtDevCommonMsg outMsg = BT_DEV_COMMON_NONE;
        for (BtDevCommonMsg msg: BtDevCommonMsg.values()) {
            if (msg.getValue() == value) {
                outMsg = msg;
                break;
            }
        }

        return outMsg;
    }
}
